package cn.edu.ncut.cs.springboot.petmanagementsystem.mapper;

import cn.edu.ncut.cs.springboot.petmanagementsystem.pojo.Pet;
import cn.edu.ncut.cs.springboot.petmanagementsystem.vo.PetInformationVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface PetMapper extends BaseMapper<Pet> {

    IPage<PetInformationVo> getPetsByCondition(IPage<PetInformationVo> petIPage, String petName, String petType, Integer gender);

    /**
     * 获取用户的宠物列表
     */
    List<PetInformationVo> getUserPets(@Param("userId") Long userId);

    /**
     * 根据ID获取宠物详情
     */
    PetInformationVo getPetById(@Param("id") Long id);
}
